import { listPagePerson, uploadFile4CerDataInit, nationlist, editPersonInfo, addPersonInfo, getPersonInfo, exportPersonInfo ,delPersonInfo} from '@/services/personalInformationApi';

export default {
    namespace: 'personalInformation',

    state: {
    },

    effects: {

        /**
        * 分页
        * @param payload
        * @param call
        * @param put
        * @returns {Generator<*, *, *>}
        */
        *listPagePerson({ payload }, { call, put }) {
            const response = yield call(listPagePerson, payload);
            return response;
        },

        /**
        * 导入
        * @param payload
        * @param call
        * @param put
        * @returns {Generator<*, *, *>}
        */
        *uploadFile4CerDataInit({ payload }, { call, put }) {
            const response = yield call(uploadFile4CerDataInit, payload);
            return response;
        },

        /**
     * 民族
     * */
        *nationlist({ payload }, { call, put }) {
            const response = yield call(nationlist, payload);
            return response;
        },
        /**
       * 修改
       * @param payload
       * @param call
       * @param put
       * @returns {Generator<*, *, *>}
       */
        *editPersonInfo({ payload }, { call, put }) {
            const response = yield call(editPersonInfo, payload);
            return response;
        },

        /**
      * 添加
      * @param payload
      * @param call
      * @param put
      * @returns {Generator<*, *, *>}
      */
        *addPersonInfo({ payload }, { call, put }) {
            const response = yield call(addPersonInfo, payload);
            return response;
        },

        /**
        * 详情
         * */
        *getPersonInfo({ payload }, { call, put }) {
            const response = yield call(getPersonInfo, payload);
            return response;
        },


        /**
 * 点击导出列表信息
 * @param payload
 * @param call
 * @param put
 * @returns {Generator<*, *, *>}
 */
        *exportPersonInfo({ payload }, { call, put }) {
            const response = yield call(exportPersonInfo, payload);
            return response;
        },



        *delPersonInfo({ payload }, { call, put }) {
            const response = yield call(delPersonInfo, payload);
            return response;
        },








    },

    reducers: {


    },
};

